Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #592 - Add null check to DetailView #593

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

OGRoomService
Copy link

Add a null check so it doesn't blindly capture data that may not exist. This was causing an issue where the template wouldn't render if the "parent_type" was null in the database.

Description

We had an issue where emails just were not loading in DetailView. It took forever to figure out why this was happening, and then even longer to figure out what was responsible for it. If an email has nothing set for related to, the associated field of parent_id is NULL in the database, which causes the capture to fail and not render the template on the page.

Bug Issue

Motivation and Context

Emails not containing parent data will simply not render in the template because of an error within the capture. Adding a null check resolves this issue and will display the detailed view of an email.

How To Test This

  1. Have an email in the database with parent_type set to null, or an empty string.
  2. Attempt to view that email record http://localhost:8080/#/emails/record/<id>
  3. View a detailed view of that email

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • I have read the How to Contribute guidelines.

Add a null check so it doesn't blindly capture data that may not exist. This was causing an issue where the template wouldn't render if the "parent_type" was null in the database.
@SuiteBot
Copy link

SuiteBot commented Jan 16, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants